<template>
  <div>
    <cross-server-group :list_type="list_type">
      <template v-slot:default="slotProps">
      </template>
    </cross-server-group>
  </div>
</template>

<script>
import CrossServerGroup from './CrossServerGroup.vue'

export default {
  components: {
    CrossServerGroup
  },
  data() {
    return {
      list_type: 0 // 初始化为数字类型
    }
  },
  methods: {
    updateListType() {
      this.list_type = Math.floor(Math.random() * 10) + 1 // 随机更新 list_type
    },
    debugSlotProps(slotProps) {
      console.log('slotProps:', slotProps)
      if (slotProps && typeof slotProps.list_type === 'number') {
        console.log('list_type is a number:', slotProps.list_type)
      } else {
        console.log('list_type is not a number or undefined')
      }
      return '' // 返回空字符串以免影响显示
    }
  }
}
</script>
